import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import './styles/global.scss'

const app = createApp(App)
app.use(router)
app.use(createPinia()) // 应用Pinia状态管理
app.use(ElementPlus, { locale: zhCn }) // 设置 Element Plus 默认语言
app.mount('#app')

// 安装Icon
import installIcon from './plugins/icon.js'
installIcon(app)

// 安装HTTP中间件
import installHttp from './plugins/http.js'
installHttp(router)
